﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace ProjectHT.YKDGVB2012.Core.Webpage
{
    public class Default : UnsecuredLayoutsPageBase
    {

        protected Panel Pnloading;
        protected override bool AllowAnonymousAccess
        {
            get { return true; }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            var rot = string.Format("{0}", Context.Request.Params[Helper.Constans.ROTS]);

            switch (rot)
            {
                case "dd":
                    LoadDanhsach(Context);
                    break;
                case "com":
                    LoadComment();
                    break;
                default:
                    LoadDanhsach(Context);
                    break;
            }
        }

        private static void LoadComment()
        {







        }

        public void LoadDanhsach(HttpContext context)
        {            
            const string _ascxPath = @"/_CONTROLTEMPLATES/YkiendgDTLuat/DanhsachDT.ascx";
            Control control = Page.LoadControl(_ascxPath);
            Pnloading.Controls.Add(control);

        }
    }
}
